﻿using System;

namespace 单例模式
{
    class Program
    {
        static void Main(string[] args)
        {
            Singleton1 s1 = Singleton1.GetInstance();
            s1.Name = "李阳";

            Singleton2 s2 = Singleton2.GetInstance();
            s2.Name = "杨丹";

            Console.WriteLine(s1.Name);
            Console.WriteLine(s2.Name);

            Console.ReadKey();
        }
    }
}
